import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path:'/login',
    name:'Login',
    component:()=>import('@/views/entry/Login')
  },
  {
    path: '/s',
    component: ()=>import('@/views/homepage/StuHomePage.vue'),
    children:[
      {
        path: '',
        name:'StuHome',
        component:()=>import('@/views/homepage/StuHome')
      },
      {
        path:'courses',
        name:'StuCourses',
        component:()=>import('@/views/course/StuCourses')
      },
      {
        path:'forum',
        name:'StuForum',
        component:()=>import('@/views/forum/StuForum')
      },
      {
        path:'teams',
        name:'StuTeams',
        component:()=>import('@/views/team/StuTeams')
      },
      {
        path: 'aboutus',
        name:'AboutUs',
        component:()=>import('@/views/homepage/AboutUs')
      }
    ]
  },
  {
    path: '/t',
    component: ()=>import('@/views/homepage/TeamHomePage'),
    children:[
      {
        path: '',
        name:'TeamHome',
        component:()=>import('@/views/homepage/StuHome')
      },
      {
        path:'courses',
        name:'TeamCourses',
        component:()=>import('@/views/course/StuCourses')
      },
      {
        path:'forum',
        name:'TeamForum',
        component:()=>import('@/views/forum/StuForum')
      },
      {
        path:'teams',
        name:'TeamTeams',
        component:()=>import('@/views/team/StuTeams')
      },
      {
        path: 'aboutus',
        component:()=>import('@/views/homepage/AboutUs')
      }
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
